home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / dsp / 56000tar.z / 56000tar / 56000 / lattice / latfir1.asm next >
Assembly Source File  |  1992-04-28  |  1KB  |  42 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Lattice FIR Filter Macro.
  6. ; Last Update 08 Aug 86   Version 1.0
  7. ;
  8. latfir1 macro   order
  9. latfir1 ident   1,0
  10. ;
  11. ;       LATTICE FIR
  12. ;
  13. ;       Lattice FIR filter macro
  14. ;
  15. ;       Input value in register B, output value in register B.
  16. ;
  17. ;       Macro call:     latfir1 order
  18. ;               order   - order of filter (number of K coefficients)
  19. ;
  20. ;       Alters Data ALU Registers:
  21. ;       x0      y0      y1      a       b
  22. ;
  23. ;       Alters Address Registers:
  24. ;       r0      r4
  25. ;
  26. ;       Alters Program Control Registers:
  27. ;       pc      sr
  28. ;
  29. ;       Uses 2 locations on stack
  30. ;
  31. ;
  32.   move           b,x:(r0)+    y:(r4)+,y0  ;sv B as fst st., mv fst k
  33.   do    #order,_endlat
  34.   move           x:(r0),a     b,y1        ;get state, set t for mul by k
  35.   macr  y1,y0,a  a,x0                     ;t*k+s, copy s
  36.   macr  x0,y0,b  a,x:(r0)+    y:(r4)+,y0  ;s*k+t, sv st., nxt k
  37. _endlat
  38.   move           (r0)-                         ;adjust pointer
  39.   endm
  40.